class Dog {
    name: string;

    constructor(name: string) {
        this.name = name;
    }

    static parseData(name: string) {
        return new Dog(name);
    }
}

class Info {
    dogInfo?: Dog;

    update(data: string) {
        switch (data) {
            case '111':
                this.update111(data);
        }
    }

    update111(data: string) {
        this.dogInfo = Dog.parseData(data);
    }
}

const store = {
    dogInfo: new Info(),
};

console.log(store.dogInfo);

setTimeout(() => {
    store.dogInfo.update('111');
    console.log('===>', store.dogInfo);
}, 1000 * 1);
